home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="utf-8" ?>
- <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
- <stack>
- <name>in.0b</name>
- <id>-1</id>
- <cardCount>52</cardCount>
- <cardID>4448</cardID>
- <listID>5703</listID>
- <cantModify><false /></cantModify>
- <cantDelete><false /></cantDelete>
- <cantAbort><false /></cantAbort>
- <cardSize>
- <width>512</width>
- <height>302</height>
- </cardSize>
- <script>on openStack
- ---
- --set up Goodies menubar
- ---
- set rectangle of this card to 0,0,512,302 --for small screens
- set cursor to busy
- create menu "Goodies"
- put "Index" into menu "Goodies" with menuMsg "doIndex"
- set commandChar of menuItem "Index" of menu "Goodies" to "I"
-
- put "Conversion" after menu "Goodies" with menuMsg "go card Conversion"
- set commandChar of menuItem "Conversion" of menu "Goodies" to "T"
-
- put "Browse" after menu "Goodies" with menuMsg "go card Browse"
- set commandChar of menuItem "Browse" of menu "Goodies" to "B"
-
- -- put "Move Card" after menu "Goodies" with menuMsg "MoveCard"
- put "Info" after menu "Goodies" with menuMsg "OpenInfoBox"
- put "Merge Recipes" after menu "Goodies" with menuMsg "MergeStacks"
-
- if the optionKey is down then
- put "UserLevel 5" after menu "Goodies" with menuMsg "set userlevel to 5"
- set commandChar of menuItem "UserLevel 5" of menu "Goodies" to "0"
- end if
-
- ---
- --- set up fractions menubar
- ---
- create menu "Fractions"
- set cursor to busy
- put "1/4,1/2,3/4,1/3,2/3,┬░,Γëê" into menu "Fractions"
- set menuMsg of menuItem "1/4" of menu "Fractions" to "doQrt"
- set commandChar of menuItem "1/4" of menu "Fractions" to "1"
- set menuMsg of menuItem "1/2" of menu "Fractions" to "doHalf"
- set commandChar of menuItem "1/2" of menu "Fractions" to "2"
- set cursor to busy
- set menuMsg of menuItem "3/4" of menu "Fractions" to "doTF"
- set commandChar of menuItem "3/4" of menu "Fractions" to "3"
- set menuMsg of menuItem "1/3" of menu "Fractions" to "doTrd"
- set commandChar of menuItem "1/3" of menu "Fractions" to "4"
- set menuMsg of menuItem "2/3" of menu "Fractions" to "doTTrd"
- set commandChar of menuItem "2/3" of menu "Fractions" to "5"
- set menuMsg of menuItem "┬░" of menu "Fractions" to "dodeg"
- set commandChar of menuItem "┬░" of menu "Fractions" to "6"
- set menuMsg of menuItem "Γëê" of menu "Fractions" to "doaprox"
- set commandChar of menuItem "Γëê" of menu "Fractions" to "7"
-
-
- if visible of cd fld InfoBox of card index then push card index
- set userlevel to 2
- end openStack
-
- on closeStack
- -- answer "Do you want to compact the stack" with "Yes" or "No"
- -- if it is "Yes" then
- -- domenu "compact stack"
- -- end if
-
- reset menubar
- if there is a window "navigator" then send "close" to window "navigator"
- end closeStack
-
- on resumeStack
- openStack
- end resumeStack
-
- on doIndex
- visual effect scroll down fast
- go card "Index"
- end doIndex
-
- on suspendStack
- closeStack
- end suspendStack
-
- ---
- --Fraction menu Output
- ---
- on doQrt
- if selectedLine() is not empty then put "1/4" after selection
- end doQrt
-
-
- on doHalf
- if selectedLine() is not empty then put "1/2" after selection
- end doHalf
-
- on doTF
- if selectedLine() is not empty then put "3/4" after selection
- end doTF
-
- on doTrd
- if selectedLine() is not empty then put "1/3" after selection
- end doTrd
-
- on doTTrd
- if selectedLine() is not empty then put "2/3" after selection
- end doTTrd
-
- on dodeg
- if selectedLine() is not empty then put "┬░" after selection
- end dodeg
-
- on doaprox
- if selectedLine() is not empty then put "Γëê" after selection
- end doaprox
-
-
-
- on doMenu MenuItem
- if MenuItem is "Delete Card" then
- if the optionkey is down then
- answer "DELETE ENTIRE COLLECTION OF RECIPES!!" with "DELETE", "no"
- if it is "DELETE" then
- do makeVirgin
- end if
- else
- answer "Are you sure you want to delete?" with "No" or "Yes"
- if it = "Yes" then
- if cantDelete of this card is true then
- if the name of the next card is not the name of this card then
- do RemoveNameFromMenu
- doClearCard
- else
- set cantDelete of this card to false -- deletes a place holder card
- set cantDelete of the next card to true -- only if the next card can substitute as a place holder
- if bkgnd fld "Recipe" is not empty then --if title is already gone, no poptab update on close card
- put empty into bkgnd fld Recipe
- do RemoveNameFromMenu
- end if
- set cantDelete of this card to false -- deletes a place holder card
- set cantDelete of the next card to true -- only if the next card can substitute as a place holder
- put the short name of this card into cardName
- if length of cardName < 8 then
- put char 7 of cardName into BaseNumber
- else
- put char 7 to 8 of cardName into BaseNumber
- end if
- put the id of the next card into line BaseNumber of cd fld IDsOfRecipe of cd conversion--make new place holder
- pass doMenu
- end if
- else
- hide cd btn "Update Index" of Card "Index"
- if bkgnd fld "Recipe" is not empty then
- put empty into bkgnd fld Recipe --when title is gone, no poptab update on close card
- do RemoveNameFromMenu
- pass doMenu
- else pass doMenu
- end if
- end if
- end if
-
- else if MenuItem is "New Card" then doNewCard
- else if MenuItem is "Find..." and not the visible of cd btn "cmd-F now Finds" of cd Browse then
- do Browse
-
- else if MenuItem is "Print Card" then
- if id of this card = id of card index then
- answer "Print recipe titles or recipes listed in this index?" with cancel,titles, recipes
- if it is "titles" then
- if cd fld indexList is empty then
- answer "Index is empty, nothing will be printed." with okay
- else
- print cd fld indexlist
- end if
- else if it is "recipes" then
- do PrintIndex
- end if
- else if char 7 to 12 of name of this card is "recipe" then
- if bkgnd fld Recipe is not empty then
- open report printing
- print this card
- close printing
- else answer "There is no title to this recipe." with "Halt Printing"
- else
- answer "Sorry, you can't print this card." with okay
- end if
- else
- pass doMenu
- end if
- end domenu
-
-
-
- on doClearCard
- if short name of this card is not "Index" and the short name of this card is not "Conversion" then
- put empty into bkgnd field "Recipe"
- put "Ingredients:" & RETURN into bkgnd field "Ingrediants"
- put "Directions:" & RETURN into bkgnd field "Directions"
- put empty into bkgnd field "Nationality"
- put empty into bkgnd field "PrepTime"
- put empty into bkgnd field "Serves"
- put "Source:" & RETURN into bkgnd field "Reference"
- put "1" into bkgnd field "Difficulty"
- put "?" into bkgnd field "Freezes"
- put "?" into bkgnd field "Refrig"
- set the hilite of bkgnd button "Lacto" to false
- set the hilite of bkgnd button "Tried" to false
- set the hilite of bkgnd button "Ovo" to false
- set the hilite of bkgnd button "MeatType" to false
- set the hilite of bkgnd button "FishType" to false
- set the hilite of bkgnd button "VegetarianType" to false
- if not visible of bkgnd fld Directions then
- click at (location of bkgnd btn "Etc.")
- end if
- hide cd btn "Update Index" of Card "Index"
- else
- answer "You can not alter this card" with "OK"
- end if
- end doClearCard
-
- ---
- ---New recipe card routine
- ---
- on doNewCard
- if the number of cd Recipe1 <= the number of this card then
- answer "Add card here?" with Cancel or No or Yes
-
- if it is yes then
- do AddCard
-
- else if it = "no" then
- lock screen
- go card "Index"
- show cd fld Background
- show cd button "Cancel"
- show cd btn "Click and Hold"
- unlock screen
- end if
-
- else
- lock screen
- go card "Index"
- show cd fld Background
- show cd btn "Click and Hold"
- show cd btn cancel
- unlock screen
- end if
- end doNewCard
-
- on AddCard
- set userlevel to 3
- doMenu "Copy Card"
- doMenu "Paste Card"
- doClearCard
- set cantDelete of this card to false
- set userlevel to 2
- NewRecipeInMenu
- select text of bkgnd field "Recipe"
- hide cd btn "Update Index" of Card "Index"
- end AddCard
-
- on OpenInfoBox
- push card
- go card Index
- if the OptionKey is down then show cd fld VersionInfo
- else show cd fld InfoBox
- end OpenInfoBox
-
- On CloseInfoBox
- hide cd fld InfoBox
- hide cd fld VersionInfo
- pop card
- end CloseInfoBox
-
-
- ---This procedure merges another recipe stack with currently open stack
- on MergeStacks
-
- answer "Automatic of Manual merge?" with "Automatic", "Manual", "Cancel"
- if it is "Cancel" then exit MergeStacks
- put it into howMerging
- if howMerging is "Automatic" then
- answer "Copy the tab headings from the old stack" with "Yes", "No"
- if it is "Yes" then put true into moveTabs
- else put false into moveTabs
- end if
-
-
- ---ask for the stack to be merged with this one
- answer file "Open other recipe stack" of type STAK
- if it is empty then exit MergeStacks
-
- put "Stack ""e&it"e into OldStackName
- put the long name of this stack into NewStackName
-
- --test if old stack is a recipe stack
- go OldStackName in a new window
- if there is no card "Recipe1" then
- answer "This is not a valid Recipe stack" with okay
- exit MergeStacks
- end if
-
- if howMerging ="Manual" then
- --Manual Merge; sets up list of recipes and goes to conversion card to process
- --generate a list of recipes and their associated tab locations
- go newStackName
- put GenerateHeaderList() into newheaderList--for comparison purposes
- go oldStackName
- put RecipeList(newHeaderList) into it
- go newStackName
- put it into cd fld oldStackRecipes of cd conversion
- go newStackName
- show cd fld "oldStackRecipes" of cd conversion
- show cd fld "instructions" of cd conversion
- show cd btn "process" of cd conversion
- show cd btn "Cancel" of cd conversion
- disable menuItem "Conversion" of menu "goodies"
- put "Merge Window" into menuItem "Merge Recipes" of menu "Goodies" with menuMsg "go card Conversion"
- go cd conversion
- put oldStackName &return&newStackName into cd fld StackNames
- else
- --Automaticaly insert recipes into stack
- --assumes stacks exist and are recipe stacks and I'm in the old recipe stack
- lock screen
- set cursor to busy
- ProgressWindow "©Dome","Merging","Now adding cards to stack."
- put the number of the last card into totalCards
- repeat with i = the number of card Recipe1 to the number of the last card
- set "thePercent" of window "Merging" to (i/totalCards*100)
- go card i of oldStackName
- if bkgnd fld recipe is not empty then
- CopyCard (id of this card &" of "& oldStackName),(name of this card &" of "& newStackName)
- end if
- end repeat
- if moveTabs then
- --move the tab headings from the old stack to the new stack
- go oldStackName
- put empty into tabHeadings
- repeat with i = 1 to 7
- put BadCharReplace(bkgnd fld ("i"&i) of cd "Index") &"," after tabHeadings
- repeat with j= 1 to 7
- put BadCharReplace(bkgnd fld ("M"&i&"S"&j) of cd (Recipe&(i*7))) & "," after tabHeadings
- end repeat
- put return after tabHeadings
- end repeat
- go newStackName
- put (line 1 of cd fld MainAndSub of cd conversion) & return & tabHeadings into cd fld MainAndSub of cd conversion
- repeat with i = 1 to 7
- put item 1 of line i of tabHeadings into bkgnd fld ("i"&i) of cd "Index"
- repeat with j=1 to 7
- put item j+1 of line i of tabHeadings into bkgnd fld ("M"&i&"S"&j) of cd (Recipe&(i*7))
- end repeat
- end repeat
- end if
- --tidy things up, close old stack
- go oldStackName in a new window
- domenu "Close Stack"
- go cd index of newStackName
- close window "Merging"
- play "sosumi" "a3s b c4 a3 a3h"
- answer "Merging completed" with okay
- unlock screen
- end if
- end MergeStacks
-
- function GenerateHeaderList
- --make list of associated tabs (main,sub), assumes i'm in proper stack
- ProgressWindow "©Dome","TabHeadings",("Compiling tab for "&the short name of this stack)
- put "" into recipeId
- repeat with j = 1 to 7 --generate tab name list
- repeat with i = 1 to 7
- set "thePercent" of window "TabHeadings" to ((j*7+i)/49*100)
- put (bkgnd fld ("i"&j) of cd index) & "," & (bkgnd fld ("M"&j&"S"&i) of cd ("Recipe" & (j*7))) & return after recipeId
- end repeat
- end repeat
- close window "TabHeadings"
- return recipeId
- end GenerateHeaderList
-
-
- function RecipeList newHeaderList
- --assumes i'm in a stack where i'm to compare recipes with the headerlist i've been provided
-
- put GenerateHeaderList () into oldHeaderList
-
- go cd recipe1
- ProgressWindow "©Dome","RecipeList",("Recipe list for "&the short name of this stack)
- put "" into theList
- put the number of the last card into totalCards
- repeat with i = the number of this card to the number of the last card
- set "thePercent" of window "RecipeList" to i/totalCards*100
- if bkgnd fld recipe of cd i is not empty then
- put the short name of card i into cardName
- if the length of cardName < 8 then
- put char 7 of cardName into recipeNumber
- else
- put char 7 to 8 of cardName into recipeNumber
- end if
-
- if line recipeNumber of oldHeaderList <> line recipeNumber of newHeaderList then
- put "*" into warning
- else put " " into warning
-
- put warning&(line recipeNumber of oldHeaderList)&","&(bkgnd fld Recipe of cd i)&","&cardName&","&(the short id of cd i)&return after theList
- end if
- end repeat
- close window "RecipeList"
- return theList
- end recipeList
-
- on CopyCard oldCard, newCard
-
- ---assumes input of long name of old and new card and they exist. Goes to old card to copy data¬
- ---then goes to new card site and inserts new card. Remains at new card location.
- go oldCard
- put char 1 to 35 of bkgnd fld "Recipe" into Recipe
- put bkgnd fld "Ingrediants" into Ingrediants
- put bkgnd fld "Directions" into Directions
- put bkgnd fld "PrepTime" into PrepTime
- put bkgnd fld "Nationality" into Nationality
- put bkgnd fld "Difficulty" into Difficulty
- put bkgnd fld "Freezes" into Freezes
- put bkgnd fld "Refrig" into refrig
- put bkgnd fld "Serves" into serves
- put bkgnd fld "reference" into reference
- put hilite of bkgnd btn "lacto" into lacto
- put hilite of bkgnd btn "ovo" into ovo
- put hilite of bkgnd btn "meattype" into meattype
- put hilite of bkgnd btn "fishtype" into fishtype
- if there is a bkgnd btn tried then
- put hilite of bkgnd btn "tried" into tried
- else
- put false into tried
- end if
-
- ---Now switch to the stack where it will be merged with
- go newCard
-
- put false into errorCard
- if the long name of this card is not newCard then
- beep
- answer "Can not find where to put this card. Skipping it." with okay
- put true into errorCard
- else
- ---see if card blank, if not, make a new one
- if bkgnd fld "Recipe" is not empty then do AddCard
- put Recipe into bkgnd fld "Recipe"
- put Ingrediants into bkgnd fld "Ingrediants"
- put Directions into bkgnd fld "Directions"
- put PrepTime into bkgnd fld "PrepTime"
- put Nationality into bkgnd fld "Nationality"
- put Difficulty into bkgnd fld "Difficulty"
- put Freezes into bkgnd fld "Freezes"
- put Refrig into bkgnd fld "refrig"
- put Serves into bkgnd fld "serves"
- put Reference into bkgnd fld "reference"
- set hilite of bkgnd btn "lacto" to lacto
- set hilite of bkgnd btn "tried" to tried
- set hilite of bkgnd btn "ovo" to ovo
- set hilite of bkgnd btn "meattype" to meattype
- set hilite of bkgnd btn "fishtype" to fishtype
- end if
- end CopyCard
-
-
- on Browse
- if hilite of cd btn "Hide Search" of cd Browse then
- lock Screen
- end if
-
- --start on correct card/skip last matching card
- if char 7 to 12 of name of this card is not "Recipe" then
- go card "Recipe1"
- else
- go next card
- end if
-
- if not BrowseHunting() then
- answer "Match not found, enter new browsing parameters?" with "no", "yes"
- if it is "yes" then
- go card browse
- else
- go card index
- end if
- else if hilite of cd btn "sound" of cd Browse then play "Wild Eep"
- unlock Screen
- end Browse
-
- --This function coordinates keywords searches and StepSearch
-
- function BrowseHunting
- if hilite of cd button "Key Word" of cd Browse then
- put KeyWordMatches() into matchResults
- else
- put StepSearch() into matchResults
- end if
- return MatchResults
- end BrowseHunting
-
-
- -- This function checks to see if browse radio buttons match current card
- -- search criteria.
-
- function OtherMatches
- put true into MatchResults
- if hilite of cd button "Lactose Free" of cd Browse and not hilite of bkgnd button "Lacto" then put false into matchResults
-
- if hilite of cd button "ovo" of cd Browse and not hilite of bkgnd button "ovo" then put false into matchResults
- if hilite of cd button "Tried" of cd Browse and not hilite of bkgnd button "Tried" then put false into matchResults
-
- if hilite of cd button "Meat" of cd Browse and not hilite of bkgnd button "MeatType" then put false into matchResults
-
- if hilite of cd button "Fish" of cd Browse and not hilite of bkgnd button "FishType" then put false into matchResults
-
- if hilite of cd button "Vegetarian" of cd Browse and not hilite of bkgnd button "VegetarianType" then put false into matchResults
-
- put char 13 to 14 of name of this card into it
- if last char of it is quote then
- put first char of it into it
- end if
- if hilite of cd btn ("M"&((trunc of ((it-1)/7))+1)) of cd browse is not true then
- put false into MatchResults
- end if
- return MatchResults
- end OtherMatches
-
-
- --This function hunts for keywords (boolean) and makes sure the radio
- --buttons matchup.
-
- function KeyWordMatches
- unmark all cards
- put number of this card into startingCard
- put true into looking
- put false into matchResults
- put "" into firstFound
-
- repeat while looking
- set cursor to busy
- find string (cd fld "Key Word" of cd Browse)
-
- if the result is not "not found" then
- put number of this card into currentCard
- if firstFound is "" then
- put id of this card into firstFound
- else if id of this cd = firstfound then
- put false into looking
- end if
-
- if looking then
- mark this card
- if hilite of cd button "and" of cd Browse then
- find (cd fld "Key Word2" of cd Browse) of marked cards
- if the result is not "Not found" and OtherMatches() then
- put true into matchResults
- put false into looking
- end if
- else if hilite of cd button "not" of cd Browse then
- find (cd fld "Key Word2" of cd Browse) of marked cards
- if the result is "Not found" and OtherMatches() then
- put true into matchResults
- put false into looking
- end if
- else if OtherMatches() then
- put true into matchResults
- put false into looking
- end if --KW1 match,no not & and
- unmark this card
- end if --looking for --
- else put false into looking --since keyword not found no point in going on
-
- if not matchResults and looking then --still hunting
- go next card
- end if
-
- end repeat
- --'or' will overide an above negative search results
- if hilite of cd button "or" of cd Browse then
- go card startingCard
- find (cd fld "Key Word2" of cd Browse)
- if the result is not "Not found" and OtherMatches() then
- if not matchResults then
- put true into matchResults
- else
- if (the number of this card) > currentCard¬
- and (the number of this card) > startingCard then go card currentCard
- end if
- end if
-
- end if
- return MatchResults
- end KeyWordMatches
-
-
- --this function steps through each recipe card and checks if its
- --characteristics match the radio buttons
-
- function StepSearch
- put false into matchResults
- put false into done
- repeat until done
- set cursor to busy
- if OtherMatches() then
- put true into matchResults
- put true into done
- else
- if the id of this card is the id of last card then
- put true into done
- else
- go next card
- end if
- end if
- end repeat
- return matchResults
- end StepSearch
-
- --this procedure removes all recipes from stack
- on MakeVirgin
- lock screen
- go line 1 of cd fld idsofRecipe of cd Conversion
- set userlevel to 5
- put false into done
- put the number of cards in this stack - the number of cd "Recipe1" into totalCards
- put 0 into zapped
- ProgressWindow "©Dome","Deleting","Now deleting all recipes"
- repeat while not done
- put 1 + zapped into zapped
- set "thePercent" of window "Deleting" to (zapped/totalCards * 100)
- if cantDelete of this card is true then
- doClearCard
- go next card
- if id of this card = id of first card then
- put true into done
- end if
- else
- domenu "Cut Card"
- if id of this card = id of first card then
- put true into done
- end if
- end if
- end repeat
-
- set "theText" of window "Deleting" to "Now Updating Index"
- repeat with i = 1 to 7
- put empty into cd fld ("subAndRecipe"&i) of cd conversion
- repeat with j = 1 to 7
- put "blank,"&return after cd fld ("subAndRecipe"&i) of cd conversion
- end repeat
- end repeat
-
- hide cd btn "Update Index" of Card "Index"
- go card index
- set visible of cd fld "indexList" to true
- set visible of cd button Parameters to true
- put "" into cd fld "indexList"
- show cd btn "Update Index"
- set userlevel to 2
- unlock screen
- close window "Deleting"
- domenu "Compact Stack"
- play boing "c5 b4 a"
- answer "Your stack is now devoid of recipes." with okay
- end MakeVirgin
-
-
- -- This procedure prints out the recipes listed on the index card.
-
- on PrintIndex
- if cd fld "IndexList" is empty then
- answer "Index is empty, so no recipes will be printed."
- else
- if hilite of cd btn "Together" then
- unmark all cards
- repeat with i = 1 to number of lines in cd fld "IndexList"
- mark card id (last word of line i of cd fld Indexlist)
- end repeat
- open report printing
- print marked cards
- close printing
-
- else
- repeat with i = 1 to number of lines in cd fld "IndexList"
- open report printing
- print card id (last word of line i of cd fld IndexList)
- close printing
- end repeat
- end if
- end if
- end PrintIndex
-
- function BadCharReplace InputWord
- put empty into output
- repeat with i = 1 to number of chars in InputWord
- if char i of InputWord is in ";,^!<(/" & quote & return then
- put " " after output
- else
- put char i of InputWord after output
- end if
- end repeat
- return output
- end BadCharReplace
-
- ---
- --**** PopUp Menu routines ****
- ---
-
- on RecipeCardIndexBtn
-
- put cd fld MainAndSub of cd conversion into choices
- put HPopUpMenu(choices, 0, top of bkgnd btn "i" +4, left of bkgnd btn "i" + 15) into place
- if place is empty then
- get the mouseLoc
- if it is within the rect of bkgnd btn "i" then
- set cursor to busy
- go to card id 4448
- end if
- else
- if item 3 of place > 0 then
- if item 3 of place is 1 then
- go cd item 2 of place
- exit RecipeCardIndexBtn
- end if
- put 7 * ((item 3 of place - 2)) + item 4 of place into CardNumber
- if item 4 of place = 0 then put 1 + CardNumber into CardNumber
- go line CardNumber of cd fld idsofRecipe of cd conversion
- end if
- end if
- end RecipeCardIndexBtn
-
- on UpdateSubTabs TabName
- put bkgnd fld TabName into item (char 4 of TabName) +1 of line char 2 of TabName + 1 of cd fld MainAndSub of cd conversion
- end UpdateSubTabs
-
- on SubTabPopMenu TabName
- if the optionKey is down then
- ask "New Tab Name"
- if the result is not "Cancel" then
- put BadCharReplace(it) into it
- if it is empty then put "blank" into it
- put it into bkgnd fld TabName
- UpdateSubTabs(TabName)
- end if
- else
- put char 2 of TabName into Main
- put char 4 of TabName into Sub
- put line sub of cd fld ("SubAndRecipe"& Main) of cd conversion into choices
- put HPopUpMenu(choices, -(the number of items in choices), top of bkgnd btn TabName -12, left of bkgnd btn TabName+4) into place
- if place is empty then
- get the mouseLoc
- if it is within the rect of bkgnd btn TabName then
- set cursor to busy
- visual effect scroll down fast
- go line (7 * (char 2 of TabName -1) + char 4 of TabName) of cd fld idsOfRecipe of cd conversion
- end if
- else
- if item 3 of place > 0 then
- go card (the number of (line 7*(Main - 1) + sub of cd fld IDsOfRecipe of cd conversion)¬
- + item 3 of place -1)
- end if
- end if
- end if
- end SubTabPopMenu
-
- on MainTabPopMenu TabName
- if the optionKey is down then
- ask "New Tab Name"
- if the result is not "Cancel" then
- put BadCharReplace(it) into bkgnd field TabName
- UpdateMainTabs(TabName)
- end if
-
- else
- put char 2 of tabName into Main
- put line Main +1 of cd fld MainAndSub of cd conversion into choices
- put "(" before first item of choices
- put HPopUpMenu(choices, sub, top of bkgnd btn TabName -5, left of bkgnd btn TabName) into place
- if place is empty then
- get the mouseLoc
- if it is within the rect of bkgnd btn TabName then
- set cursor to busy
- visual effect scroll down fast
- go card ("Recipe"&(7*(char 2 of TabName-1)+1))
- end if
- else
- if item 3 of place > 0 then
- go cd ("Recipe" & (7 * (main -1)) + item 3 of place -1)
- end if
- end if
- end if
-
- end MainTabPopMenu
-
- on UpdateMainTabs TabName
- put bkgnd fld TabName into item 1 of line char 2 of TabName +1 of cd fld MainAndSub of cd Conversion
- end UpdateMainTabs
-
- on CardOpen TabName
- set the textstyle of bkgnd fld TabName to underline
- if bkgnd fld Recipe is empty then
- select after text of bkgnd fld Recipe
- end if
- end CardOpen
-
- --Check to see if recipe name matches that found on the PopMenu list
- on CardClose TabName
- set the textstyle of bkgnd fld TabName to plain
- put bkgnd fld "Recipe" into CurrentRecipe
- if CurrentRecipe is not empty then
- put char 2 of TabName into Main
- put char 4 of TabName into Sub
- put the number of this card - the number of (line 7*(Main-1) + sub of cd fld IDsOfRecipe of cd conversion) into FromFirst
- put item FromFirst + 1 of line sub of cd fld ("SubAndRecipe"& Main) of cd conversion into InPopMenu
- if CurrentRecipe <> InPopMenu then
- put BadCharReplace(CurrentRecipe) into CurrentRecipe
- put CurrentRecipe into bkgnd fld "Recipe"
- put CurrentRecipe into item FromFirst + 1 of line sub of cd fld ("SubAndRecipe"& Main) of cd conversion
- end if
- end if
- end CardClose
-
- --Called when a recipe is deleted
- --this routine deletes the recipe name being removed
- on RemoveNameFromMenu
- put the short name of this card into cardName
- put the number of this card into skipCard
- if the length of cardName < 8 then
- put char 7 of cardName into BaseNumber
- else
- put char 7 to 8 of cardName into BaseNumber
- end if
- put (BaseNumber-1) div 7 into Main
- put BaseNumber mod 7 into sub
- if sub = 0 then put 7 into sub
- put 1 + skipCard -the number of (line BaseNumber of cd fld IDsOfRecipe of cd conversion) into skipItem
- put empty into temp
- put line sub of cd fld ("SubAndRecipe"&Main+1) of cd conversion into workingMenu
- if skipItem>1 then put item 1 to skipItem-1 of WorkingMenu & "," into temp
- else if cantdelete of this card is not false then put "blank," into temp
- if skipItem < the number of items in workingMenu then put item skipItem+1 to (the number of items of workingMenu) of workingMenu & "," after temp
- put temp into line sub of cd fld ("SubAndRecipe"&Main+1) of cd conversion
- end RemoveNameFromMenu
-
-
- --Inserts blank into popMenu for new cards
- on NewRecipeInMenu
- put the short name of this card into cardName
- if length of cardName < 8 then
- put char 7 of cardName into BaseNumber
- else
- put char 7 to 8 of cardName into BaseNumber
- end if
- put (BaseNumber-1) div 7 into Main
- put BaseNumber mod 7 into sub
- if sub = 0 then put 7 into sub
- put the number of (line BaseNumber of cd fld IDsOfRecipe of cd conversion) into starting
- put the number of this card - starting into displace
- put ",blank" after item displace of line sub of cd fld ("SubAndRecipe"&Main+1) of cd conversion
- end NewRecipeInMenu
-
- on UpdateAllSubTabs
- put empty into cd fld IDsOfRecipe of cd conversion
- repeat with j = 1 to 7
- put empty into cd fld ("SubAndRecipe" & j) of cd conversion
- set cursor to busy
- repeat with i = 1 to 7
- set cursor to busy
- put empty into temp
- put the number of cd ("Recipe" & 7*(j-1) + i) into starting
- put ("Recipe" & 7*(j-1) + i+1) into temp3
-
- if there is no card temp3 then
- put the number of the last card into ending
- else
- put (the number of cd temp3) - 1 into ending
- end if
- put (the id of cd starting) & return after cd fld IDsOfRecipe of cd conversion --keep track of place holder ids.
- repeat with k = starting to ending
- put bkgnd fld "Recipe" of cd k into temp2
- if temp2 is empty then put "blank" into temp2
- else put BadCharReplace(temp2) into temp2
- put temp2 &"," after temp
- end repeat
- put temp & return after cd fld ("SubAndRecipe" & j) of cd conversion
- end repeat
- end repeat
- end UpdateAllSubTabs
-
- on MoveCard
- if bkgnd fld recipe is empty then
- answer "Give this recipe a title before moving." with okay
- else
- put the long id of this card into cd fld moving of cd conversion
- lock screen
- go card "Index"
- show cd fld Background
- show cd button "Cancel"
- show cd btn "Click and Hold"
- show cd fld "movingMask"
- unlock screen
- end if
- end MoveCard
- </script>
- <background id="3625" file="background_3625.xml" name="Art" />
- <background id="6329" file="background_6329.xml" name="M3" />
- <background id="7902" file="background_7902.xml" name="M1" />
- <background id="10944" file="background_10944.xml" name="M4" />
- <background id="15254" file="background_15254.xml" name="" />
- <background id="15939" file="background_15939.xml" name="M5" />
- <background id="20789" file="background_20789.xml" name="M6" />
- <background id="23248" file="background_23248.xml" name="M2" />
- <background id="26175" file="background_26175.xml" name="M7" />
- <card id="4448" file="card_4448.xml" marked="false" name="Index" owner="3625" />
- <card id="7555" file="card_7555.xml" marked="false" name="Browse" owner="3625" />
- <card id="15091" file="card_15091.xml" marked="false" name="Conversion" owner="15254" />
- <card id="7203" file="card_7203.xml" marked="false" name="Recipe1" owner="7902" />
- <card id="9437" file="card_9437.xml" marked="false" name="Recipe2" owner="7902" />
- <card id="17655" file="card_17655.xml" marked="false" name="Recipe3" owner="7902" />
- <card id="23487" file="card_23487.xml" marked="false" name="Recipe4" owner="7902" />
- <card id="35989" file="card_35989.xml" marked="false" name="Recipe5" owner="7902" />
- <card id="36243" file="card_36243.xml" marked="false" name="Recipe6" owner="7902" />
- <card id="36476" file="card_36476.xml" marked="false" name="Recipe7" owner="7902" />
- <card id="36803" file="card_36803.xml" marked="false" name="Recipe8" owner="23248" />
- <card id="37082" file="card_37082.xml" marked="false" name="Recipe9" owner="23248" />
- <card id="8723" file="card_8723.xml" marked="false" name="Recipe10" owner="23248" />
- <card id="23943" file="card_23943.xml" marked="false" name="Recipe11" owner="23248" />
- <card id="24330" file="card_24330.xml" marked="false" name="Recipe12" owner="23248" />
- <card id="25079" file="card_25079.xml" marked="false" name="Recipe13" owner="23248" />
- <card id="6022" file="card_6022.xml" marked="false" name="Recipe14" owner="23248" />
- <card id="7943" file="card_7943.xml" marked="false" name="Recipe15" owner="6329" />
- <card id="8535" file="card_8535.xml" marked="false" name="Recipe16" owner="6329" />
- <card id="5349" file="card_5349.xml" marked="false" name="Recipe17" owner="6329" />
- <card id="10356" file="card_10356.xml" marked="false" name="Recipe18" owner="6329" />
- <card id="10542" file="card_10542.xml" marked="false" name="Recipe19" owner="6329" />
- <card id="9607" file="card_9607.xml" marked="false" name="Recipe20" owner="6329" />
- <card id="10163" file="card_10163.xml" marked="false" name="Recipe21" owner="6329" />
- <card id="11756" file="card_11756.xml" marked="false" name="Recipe22" owner="10944" />
- <card id="12871" file="card_12871.xml" marked="false" name="Recipe23" owner="10944" />
- <card id="13153" file="card_13153.xml" marked="false" name="Recipe24" owner="10944" />
- <card id="13334" file="card_13334.xml" marked="false" name="Recipe25" owner="10944" />
- <card id="13655" file="card_13655.xml" marked="false" name="Recipe26" owner="10944" />
- <card id="14181" file="card_14181.xml" marked="false" name="Recipe27" owner="10944" />
- <card id="15509" file="card_15509.xml" marked="false" name="Recipe28" owner="10944" />
- <card id="15675" file="card_15675.xml" marked="false" name="Recipe29" owner="15939" />
- <card id="17896" file="card_17896.xml" marked="false" name="Recipe30" owner="15939" />
- <card id="18014" file="card_18014.xml" marked="false" name="Recipe31" owner="15939" />
- <card id="18393" file="card_18393.xml" marked="false" name="Recipe32" owner="15939" />
- <card id="19596" file="card_19596.xml" marked="false" name="Recipe33" owner="15939" />
- <card id="19936" file="card_19936.xml" marked="false" name="Recipe34" owner="15939" />
- <card id="20248" file="card_20248.xml" marked="false" name="Recipe35" owner="15939" />
- <card id="20719" file="card_20719.xml" marked="false" name="Recipe36" owner="20789" />
- <card id="21961" file="card_21961.xml" marked="false" name="Recipe37" owner="20789" />
- <card id="22452" file="card_22452.xml" marked="false" name="Recipe38" owner="20789" />
- <card id="22957" file="card_22957.xml" marked="false" name="Recipe39" owner="20789" />
- <card id="25829" file="card_25829.xml" marked="false" name="Recipe40" owner="20789" />
- <card id="2192" file="card_2192.xml" marked="false" name="Recipe41" owner="20789" />
- <card id="2724" file="card_2724.xml" marked="false" name="Recipe42" owner="20789" />
- <card id="25959" file="card_25959.xml" marked="false" name="Recipe43" owner="26175" />
- <card id="28156" file="card_28156.xml" marked="false" name="Recipe44" owner="26175" />
- <card id="34006" file="card_34006.xml" marked="false" name="Recipe45" owner="26175" />
- <card id="34965" file="card_34965.xml" marked="false" name="Recipe46" owner="26175" />
- <card id="35306" file="card_35306.xml" marked="false" name="Recipe47" owner="26175" />
- <card id="9810" file="card_9810.xml" marked="false" name="Recipe48" owner="26175" />
- <card id="7004" file="card_7004.xml" marked="false" name="Recipe49" owner="26175" />
- </stack>
-